diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-12-15 15:47:58 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-12-15 15:47:58 +0000 |
| commit | 3ed2ca517aa5f2424f238817844d8a8eb98e64c2 (patch) | |
| tree | 8dc70ba88ce76b22f2539adc932deab0c00ac0c1 /snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenIntAddTests] | |
| parent | 549ec911f67484c875a09d4b5b8a9a4fc0ecc806 (diff) | |
Implement int ops in runtime
Diffstat (limited to 'snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenIntAddTests]')
1 files changed, 7 insertions, 32 deletions
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenIntAddTests]/[method:canGenerateCodeForIntAdd(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenIntAddTests]/[method:canGenerateCodeForIntAdd(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected index 74c72b1b..7a188f28 100644 --- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenIntAddTests]/[method:canGenerateCodeForIntAdd(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenIntAddTests]/[method:canGenerateCodeForIntAdd(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -1,44 +1,19 @@ Compilation unit elements: +( + function-decl + "shed__runtime__int_add" + params=((param "left" int) (param "right" int)) + return-type=int +) Locals: * (val "binaryOpResult__0" int) - * (val "intPointer__0" data-ptr) - * (val "intBinaryOpLeftValue__0" int) - * (val "intPointer__1" data-ptr) - * (val "intBinaryOpLeftValue__1" int) - * (val "intBinaryOpResultValue__0" int) - * (val "intPointer__2" data-ptr) Instructions: ( - (int-to-data-ptr (local "intPointer__0") (local "b")) - ( - memory-load - (local "intBinaryOpLeftValue__0") - pointer=(local "intPointer__0") - layout=(struct (int)) - offset=(0) - ) - (int-to-data-ptr (local "intPointer__1") (local "c")) - ( - memory-load - (local "intBinaryOpLeftValue__1") - pointer=(local "intPointer__1") - layout=(struct (int)) - offset=(0) - ) - (int-add (local "intBinaryOpResultValue__0") (local "intBinaryOpLeftValue__0") (local "intBinaryOpLeftValue__1")) - (alloc-heap (local "intPointer__2") (struct (int))) - ( - memory-store - pointer=(local "intPointer__2") - layout=(struct (int)) - offset=(0) - value=(local "intBinaryOpResultValue__0") - ) - (data-ptr-to-int (local "binaryOpResult__0") (local "intPointer__2")) + (call (local "binaryOpResult__0") "shed__runtime__int_add" ((local "b") (local "c"))) ) Temporary stack: |
